-- local lingli = fk.CreateSkill{
--     name = "wk_heg__lingli",
-- }

-- Fk:loadTranslationTable{
--   ["wk_heg__lingli"] = "令礼",
--   [":wk_heg__lingli"] = "出牌阶段限一次，你可弃置一张黑色牌，然后令所有手牌数大于你的角色执行【敕令】的效果。",
--   ["#wk_heg__lingli"] = "令礼：弃置一张黑色牌，然后令所有手牌数大于你的角色执行【敕令】的效果",

--   ["$wk_heg__lingli1"] = "吾之任，君之明举！",
--   ["$wk_heg__lingli2"] = "得义真所救，吾任之必尽瘁以报。",
-- }

-- local H = require "packages/ol_hegemony/util"

-- local function doImperialOrder(room, target)
--   local all_choices = {"IO_reveal", "IO_discard", "IO_hplose"}
--   local choices = table.clone(all_choices)
--   if target.hp < 1 then table.remove(choices) end
--   if table.every(target:getCardIds("he"), function(id)
--     return Fk:getCardById(id).type ~= Card.TypeEquip or target:prohibitDiscard(Fk:getCardById(id))
--   end) then
--     table.remove(choices, 2) -- 没有装备牌不能选择弃牌
--   end
--   if (target.general ~= "anjiang" or target:prohibitReveal()) and (target.deputyGeneral ~= "anjiang" or target:prohibitReveal(true)) then
--     table.remove(choices, 1) -- 没有暗将或不能亮将不能亮将
--   end
--   if #choices == 0 then return false end
--   local choice = room:askForChoice(target, choices, "imperial_order_skill", nil, false, all_choices)
--   if choice == "IO_reveal" then
--      H.askToRevealGenerals(target, {
--       skill_name = "imperial_order_skill",
--       cancelable = false,
--       revealAll = false,
--     })
--     target:drawCards(1, "imperial_order_skill")
--   elseif choice == "IO_discard" then
--     room:askForDiscard(target, 1, 1, true, "imperial_order_skill", false, ".|.|.|.|.|equip")
--   else
--     room:loseHp(target, 1, "imperial_order_skill")
--   end
-- end

-- lingli:addEffect("active",{
--     anim_type = "control",
--     prompt = "#wk_heg__lingli",
--     can_use = function(self, player)
--       return player:usedSkillTimes(lingli.name, Player.HistoryPhase) == 0
--     end,
--     card_num = 1,
--     target_num = 0,
--     card_filter = function(self, player, to_select, selected)
--       return #selected < 1 and Fk:getCardById(to_select).color == Card.Black and not player:prohibitDiscard(to_select)
--     end,
--     on_use = function(self, room, effect)
--       local player = effect.from
--       room:throwCard(effect.cards, lingli.name, player, player)
--       local targets = table.filter(room.alive_players, function(p)
--         return p:getHandcardNum() > player:getHandcardNum() end)
--       room:sortByAction(targets)
--       room:doIndicate(player.id, targets)
--       for _, p in ipairs(targets) do
--         doImperialOrder(room, p)
--       end
--     end,
-- })

-- return lingli